package com.zmn.plat.alipay;

import com.alipay.api.AlipayClient;
import com.alipay.api.DefaultAlipayClient;

/**
 * 类描述：阿里客户端单利
 *
 * @author yuanyunlong
 * @since 2019/08/16 14:17
 * @modifier
 */
public enum AliPayClientInstance {
    INSTANCE;

    private AlipayClient alipayClient;

    AliPayClientInstance() {
        this.alipayClient = new DefaultAlipayClient(AlipayConsts.SERVER_URL, AlipayConsts.APPID, AlipayConsts.PRIVATE_KEY, AlipayConsts.FORMAT, AlipayConsts.CHARSET, AlipayConsts.ALIPAY_PUBLIC_KEY,
            AlipayConsts.SIGN_TYPE);;
    }

    public AlipayClient getInstance() {
        return alipayClient;
    }
}
